<template>
  <!--  <div class="image" @click="onClick" :style="{backgroundImage:`url(${src})`}"></div>-->
  <img class="image" @click="onClick" :src="src">
</template>

<script>
  export default {
    name: 'chimage',
    props: {
      src: String,
      mode: String
    },
    data () {
      return {}
    },
    methods: {
      onClick () {
        this.$emit('click')
      }
    }
  }
</script>

<style lang="less" scoped>
  /*.image {*/
  /*  display: inline-block;*/
  /*  background-position: center;*/
  /*  background-repeat: no-repeat;*/
  /*  background-size: contain;*/
  /*}  */
  .image {
    display: inline-block;
    width: 100%;
    height: 100%;
  }
</style>
